import thenFs from "then-fs";

function getFiles(path){
    return new Promise(function(resolve,reject){
        thenFs.readFile(path,'utf8',(err,data) => {
            if(err){ return reject(err)}
            return resolve(data);
        })
    })
}

getFiles('./11.txt').then( r1 =>{
    console.log(r1);
} , err =>{ console.log(err.message);} );